package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.domain.pojo.TCheckItem;
import org.apache.ibatis.annotations.*;

@Mapper
public interface YCheckItemMapper {


    Page<TCheckItem> selectAll(Integer page, Integer size, String name);

    @Insert("insert into t_checkitem ( code, name,sex, age, price, type, attention, remark) values ( #{code}, #{name},#{sex}, #{age}, #{price}, #{type}, #{attention}, #{remark}) ")
    void insert(TCheckItem tCheckItem);

    @Select("select * from t_checkitem where id=#{id}")
    TCheckItem selectById(Integer id);

    @Update("update t_checkitem set code=#{code}, name=#{name}, sex=#{sex}, age=#{age}, price=#{price}, type=#{type},attention=#{attention}, remark=#{remark} where id = #{id}")
    void update(TCheckItem tCheckItem);

    @Delete("delete from t_checkitem where id=#{id}")
    void delete(Integer id);
}
